package cn.sciento.export;

import java.time.Duration;

import org.springframework.boot.context.properties.ConfigurationProperties;

@ConfigurationProperties(prefix = "stong.export")
public class ExportProperties {
    public static final String PREFIX = "stong.export";

    private static final int DEFAULT_CORE_POOL_SIZE = 3;

    private static final int DEFAULT_MAX_MUM_POOL_SIZE = 10;

    private Boolean enableAsync = Boolean.valueOf(false);

    private Integer corePoolSize = Integer.valueOf(3);

    private Integer maximumPoolSize = Integer.valueOf(10);

    private Duration keepAliveTime = Duration.ZERO;

    private Integer queueSize;

    private String asyncThreadName = "async-export-executor";

    private Integer singleExcelMaxSheetNum = Integer.valueOf(5);

    private Integer singleSheetMaxRow = Integer.valueOf(1000000);

    public Boolean getEnableAsync() {
        return this.enableAsync;
    }

    public void setEnableAsync(Boolean enableAsync) {
        this.enableAsync = enableAsync;
    }

    public Integer getCorePoolSize() {
        return this.corePoolSize;
    }

    public void setCorePoolSize(Integer corePoolSize) {
        this.corePoolSize = corePoolSize;
    }

    public Integer getMaximumPoolSize() {
        return this.maximumPoolSize;
    }

    public void setMaximumPoolSize(Integer maximumPoolSize) {
        this.maximumPoolSize = maximumPoolSize;
    }

    public Duration getKeepAliveTime() {
        return this.keepAliveTime;
    }

    public void setKeepAliveTime(Duration keepAliveTime) {
        this.keepAliveTime = keepAliveTime;
    }

    public Integer getQueueSize() {
        return this.queueSize;
    }

    public void setQueueSize(Integer queueSize) {
        this.queueSize = queueSize;
    }

    public String getAsyncThreadName() {
        return this.asyncThreadName;
    }

    public void setAsyncThreadName(String asyncThreadName) {
        this.asyncThreadName = asyncThreadName;
    }

    public Integer getSingleExcelMaxSheetNum() {
        return this.singleExcelMaxSheetNum;
    }

    public void setSingleExcelMaxSheetNum(Integer singleExcelMaxSheetNum) {
        this.singleExcelMaxSheetNum = singleExcelMaxSheetNum;
    }

    public Integer getSingleSheetMaxRow() {
        return this.singleSheetMaxRow;
    }

    public void setSingleSheetMaxRow(Integer singleSheetMaxRow) {
        this.singleSheetMaxRow = singleSheetMaxRow;
    }
}
